<?php
use \app\modules\setting\models\yjrwsz\EtcContent;
?>

<table class="bd" cellspacing="0" cellpadding="0" align="center" role="none" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px;background-color:#FFFFFF;width:600px">
    <tbody><tr style="border-collapse:collapse">
        <td align="left" style="padding:0;Margin:0">
            <table width="100%" cellspacing="0" cellpadding="0" role="none" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                <tbody><tr style="border-collapse:collapse">
                    <td valign="top" align="center" style="padding:0;Margin:0;width:600px">
                        <table width="100%" cellspacing="0" cellpadding="0" role="presentation" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                            <tbody><tr style="border-collapse:collapse">
                                <td align="center" style="padding:0;Margin:0;padding-top:20px;padding-bottom:20px;font-size:0"><a target="_blank" href="https://vikoc.com/marketplace" style="-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-family:arial, 'helvetica neue', helvetica, sans-serif;font-size:13px;text-decoration:underline;color:#666666"><img src="https://vikoc.com/storage/logo/classic-theme_logo.png" alt="logo" title="logo" width="132" style="display:block;border:0;outline:none;text-decoration:none;-ms-interpolation-mode:bicubic"></a></td>
                            </tr>
                            <tr style="border-collapse:collapse">
                                <td align="center" style="padding:0;Margin:0;padding-bottom:10px;font-size:0">
                                    <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0" role="presentation" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                                        <tbody><tr style="border-collapse:collapse">
                                            <td style="padding:0;Margin:0;border-bottom:1px solid #cccccc;background:none;height:1px;width:100%;margin:0px"></td>
                                        </tr>
                                        </tbody></table></td>
                            </tr>
                            </tbody></table></td>
                </tr>
                </tbody></table></td>
    </tr>
    <tr style="border-collapse:collapse">
        <td align="left" style="padding:0;Margin:0">
            <table width="100%" cellspacing="0" cellpadding="0" role="none" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                <tbody><tr style="border-collapse:collapse">
                    <td valign="top" align="center" style="padding:0;Margin:0;width:600px">
                        <table width="100%" cellspacing="0" cellpadding="0" role="presentation" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                            <tbody><tr style="border-collapse:collapse">
                                <td style="padding:0;Margin:0">
                                    <table class="a" width="100%" cellspacing="0" cellpadding="0" role="presentation" style="mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;border-spacing:0px">
                                        <tbody><tr class="links" style="border-collapse:collapse">
                                            <td style="Margin:0;padding-left:5px;padding-right:5px;padding-top:5px;padding-bottom:15px;border:0" width="25.00%" bgcolor="transparent" align="center"><a style="-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-family:arial, 'helvetica neue', helvetica, sans-serif;font-size:13px;text-decoration:none;display:block;color:#333333 !important;font-weight:bold" href="https://vikoc.com/marketplace">Home</a></td>
                                            <td style="Margin:0;padding-left:5px;padding-right:5px;padding-top:5px;padding-bottom:15px;border:0" width="25.00%" bgcolor="transparent" align="center"><a style="-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-family:arial, 'helvetica neue', helvetica, sans-serif;font-size:13px;text-decoration:none;display:block;color:#333333 !important;font-weight:bold" href="https://vikoc.com/marketplace/exclusive">Hot</a></td>
                                            <td style="Margin:0;padding-left:5px;padding-right:5px;padding-top:5px;padding-bottom:15px;border:0" width="25.00%" bgcolor="transparent" align="center"><a style="-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-family:arial, 'helvetica neue', helvetica, sans-serif;font-size:13px;text-decoration:none;display:block;color:#333333 !important;font-weight:bold" href="https://vikoc.com/marketplace/seller">Brands</a></td>
                                            <td style="Margin:0;padding-left:5px;padding-right:5px;padding-top:5px;padding-bottom:15px;border:0" width="25.00%" bgcolor="transparent" align="center"><a style="-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;font-family:arial, 'helvetica neue', helvetica, sans-serif;font-size:13px;text-decoration:none;display:block;color:#333333 !important;font-weight:bold" href="https://vikoc.com/marketplace/goods">Popular</a></td>
                                        </tr>
                                        </tbody></table></td>
                            </tr>
                            </tbody></table></td>
                </tr>
                </tbody></table></td>
    </tr>
    </tbody></table>

<?php
$total = EtcContent::find()->count();
if($total > 0){
    $offset = rand(0,$total - 1);
}else{
    $offset = 0;
}

$content = EtcContent::find()->offset($offset)->one();
if($content instanceof EtcContent):
?>
<table border="0" cellpadding="0" cellspacing="0" style="width: 600px; margin: 0 auto;display: block;">
    <tbody>
    <tr>
        <td align="left" style="padding:16px;word-break:break-word">
            <pre style=" white-space: pre-wrap; word-wrap: break-word;"><?php
                    echo trim($content->content);
                ?></pre>
        </td>
    </tr>
    </tbody>
</table>
<?php endif;?>